/*****************************************************************************
 *
 * Copyright (c), 2004-2020,ShangHai Neotune Information Technology Co., Ltd.
 *
 * Module Name : encode.h
 *
 * Author :    sean
 *
 * Date :    2004-02-05
 *
 * Version :    1.00
 *
 * Description :    
 *
 * Other :    
 *
 * Data Structure List: <Main Data Structure>
 *
 * Modification History
 * ---------------------------------------------------------------------------
 *  1: Data :      2004-02-05
 *    Author :     sean
 *    Version :    V100R001M00
 *    Modification : creation
 *
*****************************************************************************/

#if (!defined(encode_inc))
#define encode_inc

#ifdef __cplusplus
extern"C" {
#endif

#if (!defined(asn1conf_inc))
#include <asn1conf.h>
#endif

#if (!defined(asn1_inc))
#include <asn1.h>
#endif

#if (!defined(buffer_inc))
#include <buffer_snmp.h>
#endif

#if (!defined(ui64_inc))
#include <ui64.h>
#endif

typedef ALENGTH_T       (EHELPER_T)     __((PTR_T, OCTET_T *, ALENGTH_T));
extern  ALENGTH_T       A_SizeOfInt             __((INT_32_T));
extern  ALENGTH_T       A_SizeOfUnsignedInt     __((UINT_32_T));
extern  ALENGTH_T       A_SizeOfObjectId        __((OBJ_ID_T *));

/* We only install some functions if their types are installed */
#if (ENVOY_USE_V2_TYPES)
extern  ALENGTH_T       A_SizeOfUnsignedInt64   __((UINT_64_T *));
#endif

extern  void            A_EncodeType            __((ATVALUE_T, OCTET_T,
                                                    EHELPER_T *, OCTET_T *));
extern  void            A_EncodeLength          __((ALENGTH_T, EHELPER_T *,
                                                    OCTET_T *));
extern  void            A_EncodeInt             __((ATVALUE_T, OCTET_T,
                                                    INT_32_T,  EHELPER_T *,
                                                    OCTET_T *));
extern  void            A_EncodeUnsignedInt     __((ATVALUE_T, OCTET_T,
                                                    UINT_32_T, EHELPER_T *,
                                                    OCTET_T *));
extern  void            A_EncodeOctetString     __((ATVALUE_T, OCTET_T,
                                                    OCTET_T *, ALENGTH_T,
                                                    EHELPER_T *, OCTET_T *));
extern  void            A_EncodeObjectId        __((ATVALUE_T, OCTET_T,
                                                    OBJ_ID_T *, EHELPER_T *,
                                                    OCTET_T *));

/* We only install some functions if their types are installed */
#if (ENVOY_USE_V2_TYPES)
extern  void            A_EncodeUnsignedInt64   __((ATVALUE_T, OCTET_T,
                                                    UINT_64_T *, EHELPER_T *,
                                                    OCTET_T *));
#endif

extern  EHELPER_T       A_EncodeHelper;

#ifdef __cplusplus
}
#endif

#endif  /* encode_inc */

